package com.example.java_message_queue.common;

import java.io.Serializable;

// 表示一个 Message 的属性信息
public class BasicProperties implements Serializable {
    // 消息的唯一 id. 使用 uuid 表示.
    private String messageId;
    private String routingKey;
    // 1 表示消息非持久化. 2 表示消息持久化
    private int deliveryMode = 1;

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getRoutingKey() {
        return routingKey;
    }

    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    public int getDeliveryMode() {
        return deliveryMode;
    }

    public void setDeliveryMode(int deliveryMode) {
        this.deliveryMode = deliveryMode;
    }

    @Override
    public String toString() {
        return "BasicProperties{" +
                "messageId='" + messageId + '\'' +
                ", routingKey='" + routingKey + '\'' +
                ", deliveryMode=" + deliveryMode +
                '}';
    }
}
